/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tictactoe;

/**
 *
 * @author houfukude
 */
public class Search_1 {
    private int MAX = 10000000;
    private int MAX_DEPTH = 5;
    int value;
    private int minMaxSearch(int depth,int count){
        int best;
        if(count%2==0){
            best = MAX;
        }else{
            best = -MAX;
        }
        
        
        if(depth<=0){
            evaluater();
            return 0;
        }
        else{
           move();
           value = minMaxSearch(depth-1, count);
           remove();
           if(count%2==0){
               if(value>best){
                   best = value;
                   if(depth== MAX_DEPTH){
                       bestMove = i;
                   }
               }
                   
               
           }else{
               if(value > best){
                   best = value;
                   if(depth == MAX_DEPTH){
                       bestMove = i;
                   }
               }
           }
        }
        return best;
    }

    private void evaluater() {
        //throw new UnsupportedOperationException("Not yet implemented");
    }

    private void move() {

        //throw new UnsupportedOperationException("Not yet implemented");
    }

    private void remove() {
        //throw new UnsupportedOperationException("Not yet implemented");
    }




}
